/* 
 * File:   Lesson.h
 * Author: Tony
 *
 * Created on February 8, 2013, 2:40 PM
 */

#include <iostream>
#include <string>
#include <time.h>
#include <vector>
#include <stdlib.h>

using namespace std;

#ifndef LESSON_H
#define	LESSON_H

struct student //too be replaced by student class
{
    string studentName;
    string studentID;
};

struct Modules
{
    string subjectCode;
    string subjectName;
    int totalNumOfClass;
    vector<student> listOfStudents;
};

struct date_t
{
    int day;
    string month;
    int year;
};

class Lesson 
{
private: 
	Modules mod;
	string lessionID;
        string lecturerID;
	int lessonNumber;
	string lessonType;
	date_t dateTime;
	string venue;
	vector<student> studentsOfLesson;
	vector<student> listOfAbsent; 
        vector<Lesson> allLesson;
        vector<Modules> allModules;
public:
	//display lesson that the lecturer have
	vector<Lesson> returnLesson(string lectID);
	//get the students attending the class
	vector<student> returnListOfStudents(string lessonID);
	//get those who attend/absent from the class
	void printAttendance(string lessonID);
	//add/remove student from class
	bool addStudentToLesson(string lessonID, string name, string id);
        bool removeStudentFromLesson(string lessonID, string name, string id);
        //check the student's absent record
        vector<Lesson> checkAbsentRecord(string name);
        //check all the lessons that the student has
        vector<Lesson> checkLessonInfo(string id);
        //make new module
        bool makeNewModule(string subCode, string subName, int noOfClass);
        //edit module
        bool editModuleCode(string subCode, string newSubCode);
        bool editModuleName(string subCode, string subName);
        bool editModuleTotalLesson(string subCode, int noOfLesson);
        bool deleteModule(string subCode);
        //mark the attendance
        bool markAttendance(string lessonID, student absStudent);
        bool removeFromAbsent(string lessonID, string studID);
        bool bookVenue(string lessonID, string venue, date_t date);
};

#endif	/* LESSON_H */

